ZJANS

d827. 買鉛筆

Easy Last Update: 2026/02/01
基本運算

鉛筆一支 5 元,一打 50 元
求買 n 支鉛筆所需的金額


解法一

✅ 完整代碼

評分結果(參考) : AC (1ms, 340KB)

#include<bits/stdc++.h>
#define int long long
using namespace std;

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n;
    cin >> n;
    cout << n/12*50 + n%12*5;

    return 0;
}