#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int coins[] = {2, 5, 10, 20, 50, 100};
int typeCount = 1; // 已经包含1元硬币
int remaining = n - 1; // 减去一个1元硬币
int totalCoins = n; // 初始假设全用1元
// 尝试使用每种面值的硬币
for(int i = 0; i < 6; i++) {
if(remaining < coins[i]) {
break;
}
typeCount++;
remaining -= coins[i];
totalCoins = totalCoins - coins[i] + 1;
}
cout << typeCount << " " << totalCoins << endl;
return 0;
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] coins = {2, 5, 10, 20, 50, 100};
int typeCount = 1; // 已经包含1元硬币
int remaining = n - 1; // 减去一个1元硬币
int totalCoins = n; // 初始假设全用1元
// 尝试使用每种面值的硬币
for(int i = 0; i < 6; i++) {
if(remaining < coins[i]) {
break;
}
typeCount++;
remaining -= coins[i];
totalCoins = totalCoins - coins[i] + 1;
}
System.out.println(typeCount + " " + totalCoins);
}
}
n = int(input())
coins = [2, 5, 10, 20, 50, 100]
type_count = 1 # 已经包含1元硬币
remaining = n - 1 # 减去一个1元硬币
total_coins = n # 初始假设全用1元
# 尝试使用每种面值的硬币
for coin in coins:
if remaining < coin:
break
type_count += 1
remaining -= coin
total_coins = total_coins - coin + 1
print(f"{type_count} {total_coins}")